package com.huage.courseplatform.application.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huage.courseplatform.application.model.entity.Course;
import com.huage.courseplatform.application.model.entity.Period;
import com.huage.courseplatform.application.model.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
//@CacheNamespace(implementation= MybatisRedisCache.class,eviction= MybatisRedisCache.class)
public interface PeriodMapper extends BaseMapper<Period> {

    List<Student> getStudentListById(String id);

    void addPeriodStudent(@Param("periodId") String periodId, @Param("studentId") String studentId);

    void delPeriodStudent(@Param("periodId") String periodId, @Param("studentId") String studentId);

    List<String> getPeriodIdListByStudentId(String studentId);

    List<String> getOpenIdListByPeriodId(String periodId);

    List<String> getBusinessIdsByStudentId(String studentId);
}
